﻿#ifndef CONFIGUREDIALOG_H
#define CONFIGUREDIALOG_H

#include <QDialog>
#include <QChart>
#include <QAbstractButton>

namespace Ui {
class ConfigureDialog;
}
using namespace QtCharts;

struct ConfigStruct {

    bool enableOpenGL;
    QString displayResolution;
    QChart::ChartTheme chartTheme;
    QString screenShotPath;
    int maxTipPoints;
    int xAixsTickPoints;
    int yAxisTickPoints;

};

class ConfigureDialog : public QDialog
{
    Q_OBJECT

public:
    explicit ConfigureDialog(QWidget *parent = nullptr);
    ~ConfigureDialog();

    ConfigStruct configure() const;

    void setConfigure(const ConfigStruct &configure);

private:
    ConfigStruct m_configure;

private:
    void initial();
    void showEvent(QShowEvent *sEvent) override;

private slots:

    void on_ok_pushButton_clicked();

    void on_cancel_pushButton_clicked();


    void on_scrPath_pushButton_clicked();

private:
    Ui::ConfigureDialog *ui;

signals:

    void configureFinish();
};

#endif // CONFIGUREDIALOG_H
